<!DOCTYPE html>
<html>
<head>
    <title>运动币记录表</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="2">
                    <i-input v-model="q.uid" @on-enter="query" placeholder="用户编号"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.name" @on-enter="query" placeholder="手机号"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.mobile" @on-enter="query" placeholder="被邀请手机号"/>
                </i-col>
                <i-col span="3">
                <i-select v-model="q.type" placeholder="收益类型">
                    <i-option value="1">普通邀请注册</i-option>
                    <i-option value="2">普通运动兑换</i-option>
                    <i-option value="3">D-one产品</i-option>
                    <i-option value="4">Done运动兑换</i-option>
                    <i-option value="5">新用户注册</i-option>
                    <i-option value="6">Done邀请注册</i-option>
                    <i-option value="7">任务奖励</i-option>
                    <i-option value="8">兑换产品</i-option>
                    <i-option value="10">D-one产品</i-option>
                    <i-option :value="11">运动挖矿</i-option>
                </i-select>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.coins" @on-enter="query" placeholder="收益总数" readonly="true"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("incomecoin:info"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>
                #end
                #if($shiro.hasPermission("incomecoin:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("incomecoin:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("incomecoin:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="incomecoin" :rules="ruleValidate" :label-width="80">
            <Form-item label="交易编号" prop="tradeNo">
                <i-input v-model="incomecoin.tradeNo" placeholder="交易编号"/>
            </Form-item>
            <Form-item label="邀请人" prop="uid">
                <i-input v-model="incomecoin.uid" placeholder="邀请人"/>
            </Form-item>
            <Form-item label="手机号" prop="phone">
                <i-input v-model="incomecoin.phone" placeholder="手机号"/>
            </Form-item>
            <Form-item label="币数量" prop="sportCoin">
                <i-input v-model="incomecoin.sportCoin" placeholder="币数量"/>
            </Form-item>
            <Form-item label="兑换距离(米)" prop="distance">
                <i-input v-model="incomecoin.distance" placeholder="兑换距离"/>
            </Form-item>
            <Form-item label="被邀请人编号" prop="inviteUid">
                <i-input v-model="incomecoin.inviteUid" placeholder="被邀请人id"/>
            </Form-item>
            <Form-item label="被邀请人手机号" prop="invitePhone">
                <i-input v-model="incomecoin.invitePhone" placeholder="被邀请人手机号"/>
            </Form-item>
            <Form-item label="收益类型" prop="type">
                <i-select v-model="incomecoin.type" placeholder="收益类型">
                    <i-option :value="1">普通邀请注册</i-option>
                    <i-option :value="2">普通运动兑换</i-option>
                    <i-option :value="3">购买产品</i-option>
                    <i-option :value="4">Done运动兑换</i-option>
                    <i-option :value="5">新用户注册</i-option>
                    <i-option :value="6">Done邀请注册</i-option>
                    <i-option :value="7">任务奖励</i-option>
                    <i-option :value="8">兑换产品</i-option>
                    <i-option :value="10">D-one产品</i-option>
                    <i-option :value="11">运动挖矿</i-option>
                </i-select>
            </Form-item>
            <Form-item label="状态" prop="statu">
                <Radio-group v-model="incomecoin.statu">
                    <Radio label="1">
                        <span>有效</span>
                    </Radio>
                    <Radio label="0">
                        <span>无效</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="消费昵称" prop="inviteName">
                <i-input v-model="incomecoin.inviteName" placeholder="消费昵称"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/income/incomecoin.js?_${date.systemTime}"></script>
</body>
</html>